package collection;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class NewForDemo {
    public static void main(String[] args) {
        String[] str = {"asd","zxc","#","qwe","asdf"};
        for (String s:str){
            System.out.println(s);
        }

        Collection<String> c = new ArrayList<>();
        c.add("asd");
        c.add("#");
        c.add("qwe");
        c.add("#");
        c.add("zxc");
        c.add("#");
        c.add("rty");

        Iterator<String> it = c.iterator();
        for (String s1:c){
            System.out.println(s1);

        }
        System.out.println("c:"+c);


    }
}
